package com.clms.system.controller;

import com.clms.common.JwtUtils;
import com.clms.common.R;

import com.clms.system.pojo.entitry.SysUser;
import com.clms.system.pojo.vo.LoginVo;
import com.clms.system.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: clms-third
 * @description:
 * @author: 大鱼
 * @create: 2021-07-16 15:01
 **/
@RestController
@RequestMapping("system")
@Api(value = "登陆控制类")
public class LoginController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    @ApiOperation(value = "登陆实现方法")
    public R login(@ApiParam(value = "登录封装的类") @RequestBody LoginVo loginVo) {

        R r = userService.Findbynameandpassword(loginVo);
        return r;
    }
}
